cmake_minimum_required(VERSION 3.5)
project(sky_key_in CXX)

## C11 标准
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_EXTENSIONS ON) #使用gcc 提供的扩展
set(CMAKE_C_STANDARD_REQUIRED ON)

## C++11 标准
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 编译参数
add_definitions(-Wall)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build/lib)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

include_directories(${CMAKE_CURRENT_LIST_DIR}/src)
add_compile_options(-Wall -Wextra -Werror)
add_executable(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/src/main.cpp)
